<template>
  <div class="service-card">
    <div class="service-image">
      <img :src="imageUrl" alt="service">
    </div>
    <div class="service-info">
      <h3 class="service-title">{{ title }}</h3>
      <div class="service-price">¥{{ price }}</div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    title: String,
    price: String,
    image: String
  },
  computed: {
    imageUrl() {
      return new URL(`../assets/images/${this.image}`, import.meta.url).href
    }
  }
}
</script>

<style scoped>
.service-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.service-image img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.service-info {
  padding: 10px;
}

.service-title {
  font-size: 14px;
  margin: 0 0 5px 0;
}

.service-price {
  color: #ff6b6b;
  font-weight: bold;
}
</style>